// 拍卖状态
export const auctionStatus = {
  PENDING: 0,    // 未开始
  ONGOING: 1,    // 进行中
  FINISHED: 2,   // 已结束
  CANCELLED: 3   // 已取消
}

// 竞拍记录状态
export const recordStatus = {
  OUTBID: 0,     // 出局
  LEADING: 1,    // 领先
  WINNER: 2      // 中标
}

// 获取拍卖状态文本
export function getAuctionStatusText(status) {
  switch (status) {
    case auctionStatus.PENDING:
      return '未开始'
    case auctionStatus.ONGOING:
      return '进行中'
    case auctionStatus.FINISHED:
      return '已结束'
    case auctionStatus.CANCELLED:
      return '已取消'
    default:
      return '未知状态'
  }
}

// 获取竞拍记录状态文本
export function getRecordStatusText(status) {
  switch (status) {
    case recordStatus.OUTBID:
      return '出局'
    case recordStatus.LEADING:
      return '领先'
    case recordStatus.WINNER:
      return '中标'
    default:
      return '未知状态'
  }
}

// 获取拍卖状态样式
export function getAuctionStatusStyle(status) {
  switch (status) {
    case auctionStatus.PENDING:
      return 'info'
    case auctionStatus.ONGOING:
      return 'success'
    case auctionStatus.FINISHED:
      return 'warning'
    case auctionStatus.CANCELLED:
      return 'danger'
    default:
      return 'info'
  }
}

// 获取竞拍记录状态样式
export function getRecordStatusStyle(status) {
  switch (status) {
    case recordStatus.OUTBID:
      return 'info'
    case recordStatus.LEADING:
      return 'success'
    case recordStatus.WINNER:
      return 'warning'
    default:
      return 'info'
  }
} 